﻿@model MusicStore.Models.Register
@{
    ViewBag.Title = "Create";
}

<h2>用户注册页面</h2>

@using (Html.BeginForm())
{
    //防CSRF攻击：防跨站请求攻击
    @Html.AntiForgeryToken()

    <div>
        <h4>用户注册页面</h4>
        <hr />

        @*简单验证：当其值为真时，进行数据验证操作*@
        @Html.ValidationSummary(true, "")
        <div>
            @Html.LabelFor(model => model.UserId, "用户名：")
            <div>
                @Html.EditorFor(model => model.UserId)
                @Html.ValidationMessageFor(model => model.UserId)
            </div>
        </div>

        <div>
            @Html.LabelFor(model => model.PassWord, "密 码：")
            <div>
                @Html.EditorFor(model => model.PassWord)
                @Html.ValidationMessageFor(model => model.PassWord)
            </div>
        </div>

        <div>
            @Html.LabelFor(model => model.PassWordsConfirmation, "密码确认：")
            <div>
                @Html.EditorFor(model => model.PassWordsConfirmation)
                @Html.ValidationMessageFor(model => model.PassWordsConfirmation)
            </div>
        </div>     
        <div>
            <input type="submit" value="注册"/>
        </div>
    </div>

}



